﻿/**
 * Thông tin Đồ án , nhóm thực hiện,...
 * DONE
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace GUI.View
{
    public partial class About : UserControl
    {
        public About()
        {
            InitializeComponent();
        }

        private AppCommands _Commands;

        public AppCommands Commands
        {
            get { return _Commands; }
            set
            {
                if (value != _Commands)
                {
                    AppCommands oldValue = _Commands;
                    _Commands = value;
                    OnCommandsChanged(oldValue, value);
                }
            }
        }

        protected virtual void OnCommandsChanged(AppCommands oldValue, AppCommands newValue)
        {
            if (newValue != null)
            {
                btnCancel.Command = newValue.AboutCommands.Cancel;
            }
            else
            {
                btnCancel.Command = null;

            }
        }
    }
}
